Find the maximum value of
\[y = \tan \left( x + \frac{2 \pi}{3} \right) - \tan \left( x + \frac{\pi}{6} \right) + \cos \left( x + \frac{\pi}{6} \right)\]for $-\frac{5 \pi}{12} \le x \le -\frac{\pi}{3}.$
Let $z = -x - \frac{\pi}{6}.$  Then $\frac{\pi}{6} \le z \le \frac{\pi}{4},$ and $\frac{\pi}{3} \le 2z \le \frac{\pi}{2}.$  Also,
\[\tan \left( x + \frac{2 \pi}{3} \right) = \tan \left( \frac{\pi}{2} - z \right) = \cot z,\]so
\begin{align*}
y &= \cot z + \tan z + \cos z \\
&= \frac{\cos z}{\sin z} + \frac{\sin z}{\cos z} + \cos z \\
&= \frac{\cos^2 z + \sin^2 z}{\sin z \cos z} + \cos z\\
&= \frac{1}{\sin z \cos z} + \cos z.
\end{align*}From the angle addition formula, $\sin 2z = \sin (z + z) = \sin z \cos z + \cos z \sin z = 2 \sin z \cos z,$ so
\[y = \frac{2}{2 \sin z \cos z} + \cos z = \frac{2}{\sin 2z} + \cos z.\]Note that $\sin 2z$ is increasing on the interval $\frac{\pi}{3} \le 2z \le \frac{\pi}{2},$ so $\frac{2}{\sin 2z}$ is decreasing.  Furthermore, $\cos z$ is decreasing on the interval $\frac{\pi}{6} \le z \le \frac{\pi}{4}.$  Therefore, $y$ is a decreasing function, which means that the maximum occurs at $z = \frac{\pi}{6}.$  Thus, the maximum value is
\[\frac{2}{\sin \frac{\pi}{3}} + \cos \frac{\pi}{3} = \frac{2}{\sqrt{3}/2} + \frac{\sqrt{3}}{2} = \boxed{\frac{11 \sqrt{3}}{6}}.\]